/* 
 * File:   GenericContingencyMatrix.h
 * Author: Guilherme Monteiro
 *
 */

#ifndef GENERICCONTINGENCYMATRIX_H
#define	GENERICCONTINGENCYMATRIX_H

using namespace std;

template <class T>
class GenericContingencyMatrix {
public:
    GenericContingencyMatrix(vector<T> userAnswers, 
            vector<T> softwareOutput);
    GenericContingencyMatrix(const GenericContingencyMatrix& orig);
    virtual ~GenericContingencyMatrix();
    
    double getTP();
    double getTN();
    double getFP();
    double getFN();
    double getTPR();
    double getFPR();
    
private:
    double TP;
    double TN;
    double FP;
    double FN;
    double TPR;
    double FPR;
    
protected:
    vector<T> userAnswers;
    vector<T> softwareOutput;
    
    void setUserAnswers(vector<T> userAnswers);
    void setSoftwareOutput(vector<T> softwareOutput);
            
    void setTP(double TP);
    void setTN(double TN);
    void setFP(double FP);
    void setFN(double FN);
    void setTPR();
    void setFPR();
    
    virtual void calculateContingencyMatrix() = 0;
};

#endif	/* GENERICCONTINGENCYMATRIX_H */

